home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / update / RCS / update.man,v < prev   
Encoding:
Text File  |  1992-01-28  |  11.4 KB  |  412 lines

  1. head     1.8;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.8
  10. date     92.01.27.22.22.46;  author jhh;  state Exp;
  11. branches ;
  12. next     1.7;
  13.  
  14. 1.7
  15. date     90.08.27.11.32.58;  author shirriff;  state Exp;
  16. branches ;
  17. next     1.6;
  18.  
  19. 1.6
  20. date     90.02.27.17.32.51;  author douglis;  state Exp;
  21. branches ;
  22. next     1.5;
  23.  
  24. 1.5
  25. date     90.02.15.14.49.30;  author douglis;  state Exp;
  26. branches ;
  27. next     1.4;
  28.  
  29. 1.4
  30. date     88.12.30.10.26.45;  author ouster;  state Exp;
  31. branches ;
  32. next     1.3;
  33.  
  34. 1.3
  35. date     88.12.28.11.37.36;  author ouster;  state Exp;
  36. branches ;
  37. next     1.2;
  38.  
  39. 1.2
  40. date     88.12.22.13.49.54;  author brent;  state Exp;
  41. branches ;
  42. next     1.1;
  43.  
  44. 1.1
  45. date     88.12.22.13.15.50;  author ouster;  state Exp;
  46. branches ;
  47. next     ;
  48.  
  49.  
  50. desc
  51. @@
  52.  
  53.  
  54. 1.8
  55. log
  56. @added -p option
  57. @
  58. text
  59. @' $Header: /user6/jhh/src/cmds/update.new/RCS/update.man,v 1.7 90/08/27 11:32:58 shirriff Exp Locker: jhh $ SPRITE (Berkeley)
  60. .so \*(]ltmac.sprite
  61. .HS UPDATE cmds
  62. .BS
  63. .SH NAME
  64. update \- A copy program that recursively updates directory trees
  65. .SH SYNOPSIS
  66. \fBupdate\fR [\fIoptions\fR] \fIsrc1 ... srcN targetDir\fR
  67. .br
  68. \fBupdate\fR [\fIoptions\fR] \fIsrc target\fR
  69. .SH OPTIONS
  70. .IP "\fB\-b \fIdirectory\fR" 15
  71. Before updating a target, save a backup copy of the file in
  72. \fIdirectory\fR.
  73. .IP "\fB\-B \fIdays\fR" 15
  74. Only save the target as a backup copy if no backup exists or if the
  75. target is \fIdays\fR days old.  
  76. .IP "\fB\-f\fR" 15
  77. Force:  always update targets regardless of last-modified times.
  78. .IP "\fB\-g \fIgroup\fR" 15
  79. Change the group of any updated files to \fIgroup\fR.  Targets that aren't
  80. updated do not have their groups changed.
  81. .IP "\fB\-help\fR" 15
  82. Print a summary of the command-line options and exit without updating
  83. any targets.
  84. .IP "\fB\-l\fR" 15
  85. If a source file is a symbolic link then \fBupdate\fR normally creates an
  86. identical symbolic link at the destination.  If the \fB\-l\fR switch
  87. is specified, then \fBupdate\fR copies the file referenced by the source link,
  88. rather than the link itself.
  89. .IP "\fB\-m \fImode\fR" 15
  90. When updating a target, set its protection bits to \fImode\fR.  Targets
  91. that aren't updated do not have their protection changed.  \fIMode\fR
  92. must be specified in octal.
  93. .IP "\fB\-n\fR" 15
  94. Be nice about problems with file types not matching (i.e. don't return
  95. an error).
  96. .IP "\fB\-M\fR" 15
  97. When updating a target, do it by moving the source instead of by
  98. copying.  This may be useful when disk space is tight.
  99. .IP "\fB\-o \fIowner\fR" 15
  100. Perform all updates as user \fIowner\fR, so that newly-created targets
  101. will be owned by \fIowner\fR.  Any targets that are not updated will
  102. not have their \fIowner\fR changed.
  103. .IP "\fB\-O\fR" 15
  104. This option preserves ownership on newly created files.  Only root or
  105. wheel group members can use this option.
  106. .VS
  107. .IP "\fB\-p \fIpruneExpr\fR" 15
  108. Prune subtress whose name matches the given regular expression.
  109. .VE
  110. .IP "\fB\-q\fR" 15
  111. Quiet.  Don't print anything except for error messages.  \fBUpdate\fR normally
  112. prints a message for each file copied.
  113. .IP "\fB\-s\fR" 15
  114. Strip.  Source files are all expected to be executable binaries.  When
  115. copying, strip all of the symbol and relocation information from the
  116. updated target.
  117. .IP "\fB\-t\fR" 15
  118. Instead of setting the last-accessed and last-modified times of each
  119. target to match those of its source, leave them alone, so that they are
  120. set to the current time.
  121. .IP "\fB\-v\fR" 15
  122. Verify.  Don't actually modify any files, but print information about
  123. which files would have been modified.
  124. .BE
  125.  
  126. .SH INTRODUCTION
  127. .PP
  128. The \fBupdate\fR command is used to replace out-of-date copies of files with
  129. more recent versions.  It operates on one or more source files.  For
  130. each source, \fBupdate\fR locates a corresponding target;  if the target
  131. doesn't exist, or if the last-modified
  132. time of the source is later than the last-modified time
  133. of the target, or if the \fB\-f\fR option
  134. is specified, then \fBupdate\fR makes a copy of the source at the target.
  135. The target's last-modified time and permissions will be set identical
  136. to those of the source.
  137. .PP
  138. In the simplest case, two file names are given, both of which are
  139. regular files.  In this case the first file name is the source and
  140. the second is the target.  If the last file name refers to
  141. a directory, then all the other file names (of which there may be
  142. more than one) are sources.
  143. Each source file will be updated to the corresponding file
  144. \fIwithin\fR the target directory.  For example, in the command
  145. .DS
  146. \fBupdate /a/b c d foo\fR
  147. .DE
  148. the target for \fB/a/b\fR will be \fBfoo/b\fR, the target for \fBc\fR
  149. will be \fB/foo/c\fR, and the target for \fBd\fR will be \fBfoo/d\fR.
  150. .PP
  151. If any of the source files is a directory, then its entire subtree will
  152. be updated to the corresponding target, maintaining the subtree
  153. structure of the
  154. source.  In the special case where only two file names are given
  155. and both are directories, then the source is updated \fIto\fR
  156. the target directory rather than \fIwithin\fR it.  Thus, in the command
  157. .DS
  158. \fBupdate a b\fR
  159. .DE
  160. where \fBa\fR and \fBb\fR are both directories and
  161. \fBa\fR contains one subdirectory \fBc\fR which in turn
  162. contains one file \fBd\fR, the target corresponding
  163. to \fBa/c/d\fR will be \fBb/c/d\fR.  \fBUpdate\fR will create the
  164. directory \fBb/c\fR if it doesn't already exist.
  165. .PP
  166. \fBUpdate\fR will also copy symbolic links.  Normally it creates matching
  167. symbolic links at the targets, but it will copy the files pointed to
  168. by the links if the \fB\-l\fR switch is given.
  169. .PP
  170. If the target for a source already exists but has a type different from
  171. the source (e.g. the target is a directory and the source is a regular
  172. file), then \fBupdate\fR will not modify the target.  If the target's last-modified
  173. time is more recent than the source's, then again \fBupdate\fR will not modify
  174. the target.
  175.  
  176. .SH "USER AND GROUP CHANGES"
  177. .PP
  178. There are several restrictions on usage of the \fB\-O\fR, \fB\-o\fR and \fB\-g\fR
  179. switches.
  180. You may specify \fB\-O\fR only if you are root or in the wheel group.
  181. You may specify \fB\-g \fIgroup\fR as long as you are a member
  182. of \fIgroup\fR.
  183. You may specify \fB\-o \fIowner\fR if either
  184. .IP [1]
  185. You are \fIowner\fR (which isn't very interesting).
  186. .IP [2]
  187. \fIOwner\fR is \fBroot\fR, and you are a member of the \fBwheel\fR group.
  188. .IP [3]
  189. There is a group with the same name as \fIowner\fR and you are a member
  190. of that group.
  191.  
  192. .SH "SET-USER_ID"
  193. .PP
  194. If you haven't specified the \fB\-m\fR switch, then \fBupdate\fR attempts
  195. to preserve set-user-id bits.  It also attempts to preserve set-user-id
  196. bits when making backup copies, even if the \fB\-m\fR switch was given.
  197. However, set-user-id bits are not preserved unless the owner of the
  198. target file is the same as the owner of the source file (this condition
  199. is always true if the \fB\-O\fR switch is given).
  200.  
  201. .SH "BACKUP FILES"
  202. .PP
  203. If the \fB\-b\fR switch is specified, then \fBupdate\fR attempts to
  204. ensure that a backup copy of the target is saved, if the target
  205. already exists.  If a backup already exists, then the backup is
  206. overwritten only if the target is relatively old (a parameter that
  207. defaults to files two weeks old and may be overridden by the \fB-B\fR
  208. switch, specifying the requisite age in days).  If the \fB-B\fR switch
  209. specifies an age of 0, then the most 
  210. recent target will always be backed up.  Normally, the default of 14
  211. (two weeks) is used to guarantee that an unstable file does not
  212. overwrite a stable backup.
  213.  
  214. .VS
  215. .SH "PRUNING SUB-TREES"
  216. .PP
  217. The \fB\-p\fR option can be used to prune unwanted sub-trees from the source
  218. files. The argument is a regular expression that is matched against all source
  219. files before updating them.  If the expression matches then the source is
  220. not updated.  The expression is matched against only the tail of the source
  221. path name, so using an expression of "foo/bar" will not do what you think
  222. it will. If the argument contains any magic characters such as "*" then you
  223. better put it inside of quotes otherwise csh will glob it first.  Multiple
  224. \fB\-p\fR options can be specified and will be compared against the source files
  225. one at a time. 
  226. .VE
  227. .SH KEYWORDS
  228. copy, up-to-date
  229.  
  230. .SH "SEE ALSO"
  231. cp, mv, tar
  232. @
  233.  
  234.  
  235. 1.7
  236. log
  237. @Added -n flag to ignore errors.
  238. @
  239. text
  240. @d1 1
  241. a1 1
  242. ' $Header: /sprite/src/cmds/update/RCS/update.man,v 1.6 90/02/27 17:32:51 douglis Exp Locker: shirriff $ SPRITE (Berkeley)
  243. d48 4
  244. d156 13
  245. @
  246.  
  247.  
  248. 1.6
  249. log
  250. @documented backup files
  251. @
  252. text
  253. @d1 1
  254. a1 1
  255. ' $Header: /sprite/src/cmds/update/RCS/update.man,v 1.5 90/02/15 14:49:30 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  256. d35 3
  257. @
  258.  
  259.  
  260. 1.5
  261. log
  262. @updated to conform to check for existing backup file
  263. @
  264. text
  265. @d1 1
  266. a1 1
  267. ' $Header: /sprite/src/cmds/update/RCS/update.man,v 1.4 88/12/30 10:26:45 ouster Exp Locker: douglis $ SPRITE (Berkeley)
  268. d15 3
  269. a17 1
  270. If a backup copy exists, \fBupdate\fR will print an error message and exit.
  271. d136 13
  272. d151 3
  273. @
  274.  
  275.  
  276. 1.4
  277. log
  278. @More format upgrades.
  279. @
  280. text
  281. @d1 1
  282. a1 1
  283. ' $Header: /a/newcmds/update/RCS/update.man,v 1.3 88/12/28 11:37:36 ouster Exp Locker: ouster $ SPRITE (Berkeley)
  284. d13 3
  285. a15 1
  286. Before updating a target, save a backup copy of the file in \fIdirectory\fR.
  287. @
  288.  
  289.  
  290. 1.3
  291. log
  292. @Document set-user-id stuff.
  293. @
  294. text
  295. @d1 1
  296. a1 1
  297. ' $Header: /a/newcmds/update/RCS/update.man,v 1.2 88/12/22 13:49:54 brent Exp $ SPRITE (Berkeley)
  298. d12 1
  299. a12 1
  300. .IP "\fB-b \fIdirectory\fR" 15
  301. d14 1
  302. a14 1
  303. .IP "\fB-f\fR" 15
  304. d16 1
  305. a16 1
  306. .IP "\fB-g \fIgroup\fR" 15
  307. d19 1
  308. a19 1
  309. .IP "\fB-help\fR" 15
  310. d22 4
  311. a25 4
  312. .IP "\fB-l\fR" 15
  313. If a source file is a symbolic link then Update normally creates an
  314. identical symbolic link at the destination.  If the \fB-l\fR switch
  315. is specified, then Update copies the file referenced by the source link,
  316. d27 1
  317. a27 1
  318. .IP "\fB-m \fImode\fR" 15
  319. d31 1
  320. a31 1
  321. .IP "\fB-M\fR" 15
  322. d34 1
  323. a34 1
  324. .IP "\fB-o \fIowner\fR" 15
  325. d38 1
  326. a38 1
  327. .IP "\fB-O\fR" 15
  328. d41 2
  329. a42 2
  330. .IP "\fB-q\fR" 15
  331. Quiet.  Don't print anything except for error messages.  Update normally
  332. d44 1
  333. a44 1
  334. .IP "\fB-s\fR" 15
  335. d48 1
  336. a48 1
  337. .IP "\fB-t\fR" 15
  338. d52 1
  339. a52 1
  340. .IP "\fB-v\fR" 15
  341. d59 1
  342. a59 1
  343. The Update command is used to replace out-of-date copies of files with
  344. d61 1
  345. a61 1
  346. each source, Update locates a corresponding target;  if the target
  347. d64 2
  348. a65 2
  349. of the target, or if the \fB-f\fR option
  350. is specified, then Update makes a copy of the source at the target.
  351. d94 1
  352. a94 1
  353. to \fBa/c/d\fR will be \fBb/c/d\fR.  Update will create the
  354. d97 1
  355. a97 1
  356. Update will also copy symbolic links.  Normally it creates matching
  357. d99 1
  358. a99 1
  359. by the links if the \fB-l\fR switch is given.
  360. d103 2
  361. a104 2
  362. file), then Update will not modify the target.  If the target's last-modified
  363. time is more recent than the source's, then again Update will not modify
  364. d109 1
  365. a109 1
  366. There are several restrictions on usage of the \fB-O\fR, \fB-o\fR and \fB-g\fR
  367. d111 2
  368. a112 2
  369. You may specify \fB-O\fR only if you are root or in the wheel group.
  370. You may specify \fB-g \fIgroup\fR as long as you are a member
  371. d114 1
  372. a114 1
  373. You may specify \fB-o \fIowner\fR if either
  374. d125 1
  375. a125 1
  376. If you haven't specified the \fB-m\fR switch, then Update attempts
  377. d127 1
  378. a127 1
  379. bits when making backup copies, even if the \fB-m\fR switch was given.
  380. d130 1
  381. a130 1
  382. is always true if the \fB-O\fR switch is given).
  383. @
  384.  
  385.  
  386. 1.2
  387. log
  388. @Added -O option
  389. @
  390. text
  391. @d1 1
  392. a1 1
  393. ' $Header: /a/newcmds/update/RCS/update.man,v 1.1 88/12/22 13:15:50 ouster Exp Locker: brent $ SPRITE (Berkeley)
  394. d122 9
  395. @
  396.  
  397.  
  398. 1.1
  399. log
  400. @Initial revision
  401. @
  402. text
  403. @d1 1
  404. a1 1
  405. ' $Header: update,v 1.4 88/08/18 14:29:11 ouster Exp $ SPRITE (Berkeley)
  406. d38 3
  407. d109 4
  408. a112 2
  409. There are several restrictions on usage of the \fB-o\fR and \fB-g\fR
  410. switches.  You may specify \fB-g \fIgroup\fR as long as you are a member
  411. @
  412.